-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
teraslice esm migration #3511
teraslice esm migration #3511
Conversation
…amic import for teraslice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions here.
packages/teraslice/jest.config.js
Outdated
|
||
const config = module.default(dirPath); | ||
|
||
config.preset = "ts-jest/presets/default-esm"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we get rid of ts-jest, is this config still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are still using ts-jest for almost the rest of the packages so its not removed, going to do this library by library and not mess with things that work untill we can remove it all after conversion.
@@ -1,14 +1,3 @@ | |||
// TODO: see if I can fix this | |||
function hasKafkaConnector() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know why this was originally added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to conditionally add default configuration if the library is being used, I just made it so its always there
this.gcStats = require('gc-stats')(); | ||
// @ts-expect-error | ||
const stats = await import('gc-stats'); | ||
console.log('stats', stats); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log('stats', stats); |
Do we still want this console.log
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good catch, looking into it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the only thing you need to actually resolve on this PR prior to merge.
Please let me know when you're done and want review again.
Issues:
@swc/jest
for typescript compiling for jest testing is causing errors with class decorators, so I am keeping ts-jest for the rest of the tests and using the new one until it can be properly configured